import { defineStore } from 'pinia';

const mainStore = defineStore('main', {
  state: () => {
    return {
      count: 0,
      code: 0,
      tableData: [],
    };
  },
  getters: {
    countGetter(state) {
      return state.count * 2;
    },
  },
  actions: {
    addCount() {
      this.count++;
    },
  },
});

export default mainStore;
